package com.sokal.easycare.modules.order.dao.withdraw;


import com.sokal.easycare.common.persistence.CrudDao;
import com.sokal.easycare.common.persistence.annotation.MyBatisDao;
import com.sokal.easycare.modules.order.entity.withdraw.UserWithdraw;
import com.sokal.easycare.modules.order.entity.withdraw.WithdrawQuery;
import com.sokal.easycare.modules.payment.entity.TransactionRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 提现相关DAO接口
 * Created by cwl on 2017/7/27.
 */
@MyBatisDao
public interface UserWithdrawDao extends CrudDao<UserWithdraw> {

    int deleteByPrimaryKey(String id);

    int insert(UserWithdraw record);

    int insertSelective(UserWithdraw record);

    UserWithdraw selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(UserWithdraw record);

    int updateByPrimaryKey(UserWithdraw record);

    /**
     * 查询用户提现的所有流水信息
     * @param query
     * @return
     */
    List<UserWithdraw> listAllWithdraw(WithdrawQuery query);

    /**
     * 通过交易流水id获取提现姜详情
     * @param transactionId 流水Id
     * @return
     */
    UserWithdraw getUserWithdrawByTransactionId(@Param(value = "transactionId") String transactionId,@Param(value = "poundage") Float poundage);

    /**
     * 通过处理人，打印人获取提现详情
     * @param query
     * @return
     */
    List<UserWithdraw> listByHandle(WithdrawQuery query);
}
